package edu.sctu.xialei.june.day20150602one;

/**
 * Created by Administrator on 6/2/2015.
 */
public class MyThread1 extends Thread{

    private final String string;

    public MyThread1(String string){
        this.string = string;
    }

    public void run(){
        for (int i = 0; i < 20; i++) {
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println(string);
        }
    }
}
